<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

namespace App\Model;

/**
 * Description of BaseModel
 *
 * @author zike
 */
class BaseModel extends \EasySwoole\ORM\AbstractModel {

    //put your code here

    protected $pre = 'eb_';

    public function __construct(array $data = []) {
	$this->tableName = $this->pre . $this->tableName;
	parent::__construct($data);
    }

    public function tableName(?string $name = null, bool $is_temp = false) {
	if ($name !== null)
	    $name = $this->pre . $name;
	return parent::tableName($name, $is_temp); // TODO: Change the autogenerated stub
    }

}
